package com.zhuang.thread.blocked;

public class BlockedDemo {
	public static void main(String[] args) throws Exception {

		Object object = new Object();

		A a = new A("小强", object);
		B b = new B("小黄", object);

		a.start();
		b.start();

		Thread.sleep(3000);
		System.out.println("线程A的状态是：" + a.getState());
		System.out.println("线程B的状态是：" + b.getState());

		Thread.sleep(3000);
		System.out.println("线程A的状态是：" + a.getState());
		System.out.println("线程B的状态是：" + b.getState());
	}
}
